﻿using Microsoft.Phone.Tasks;
using Q42.WinRT.Data;
using SpaceNeedle.SDK.Windows.Platform.Commands;
using SpaceNeedle.SDK.Windows.Platform.Data;
using SpaceNeedle.SDK.WindowsPhone;
using SpaceNeedle.SDK.WindowsPhone.Views;
using SpaceNeedle.x6473.WindowsPhone.Common;
using SpaceNeedle.x6473.WindowsPhone.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Input;


namespace SpaceNeedle.x6473.WindowsPhone.ViewModels
{
    public class WelcomeViewModel : GlobalViewModel
    {
        public WelcomeViewModel() :base()
        {
            this.LoginRedirectCommand = new RelayCommand(LoginRedirect);
        }

        public ICommand LoginRedirectCommand { get; set; }

        private void LoginRedirect (object param)
        {
            AppServices.Current.NavigationService.NavigateDirect(ViewsUris.Auth);
        }

        protected async override void Load()
        {
            await this.LoadAsync();

            Tracking.SendView(ViewsNames.Welcome);
        }
    }
}
